package com.barney.support.util;

import java.io.File;
import java.io.InputStream;

public class ClasspathResourceUtils {

	public static InputStream getResourceAsStream(String resourcePath) {
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		return loader.getResourceAsStream(resourcePath);
	}

	public static File getResource(String resourcePath) {
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		return new File(loader.getResource(resourcePath).getFile());
	}
}
